# coding: utf-8
# author: ZhenbPeng
#   date: 2017/10/17 14:07
import os
import importlib
import logging
import logging.config


class Settings(object):

    def __init__(self, settings_module):
        mod = importlib.import_module(settings_module)
        for x in dir(mod):
            setting_value = getattr(mod, x)
            setattr(self, x, setting_value)


Setting = Settings(os.getenv("ADTRICK_SETTINGS", "settings.common"))
logging.config.dictConfig(Setting.LOGGING)


